package pl.softech.gpw.candles.patterns.impl2;

import pl.softech.gpw.candles.Candle;

/**
 * TODO
 * SHORT_LOW_SHADOW_RULE
 * SHORT_HIGH_SHADOW_RULE
 * SHORT_BOTH_SHADOWS_RULE
 *  
 * 
 */
public enum CandleRules implements IRule {
    
    COLOR_RULE(new CandleColorRule()),
    BOTH_SHADOWS_RULE(new CandleBothShadowsRule()),
    LOW_SHADOW_RULE(new CandleLowShadowRule()),
    HIGH_SHADOW_RULE(new CandleHighShadowRule()),
    SEQ_ENGFULS_BODY_RULE(new CandleSeqEngfulsBodyRule()),
    GREEDY_ENGFULS_BODY_RULE(new CandleGreedyEngfulsBodyRule()),
    IS_DOJI_RULE(new CandleIsDojiRule()),
    LONG_BODY_RULE(new CandleLongBodyRule()),
    RELATIVE_LONG_BODY_RULE(new CandleRelativeLongBodyRule()),
    RELATVE_SHORT_HIGH_SHADOW_RULE(new CandleRelativeShortHighShadowRule()),
    RELATVE_SHORT_LOW_SHADOW_RULE(new CandleRelativeShortLowShadowRule()),
    RELATVE_SHORT_BOTH_SHADOWS_RULE(new CandleRelativeShortBothShadowsRule()),
    SEQ_BLOW_RULE(new CandleSeqBelowRule()),
    SEQ_ABOVE_RULE(new CandleSeqAboveRule());
    
    
    private final IRule rule;
    
    private CandleRules(IRule rule) {
        this.rule = rule;
    }

    @Override
    public boolean match(Candle[] pattern, Candle[] candles) {
        return rule.match(pattern, candles);
    }

}
